home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form Form1
- Caption = "VB Example 26"
- ClientHeight = 4785
- ClientLeft = 1410
- ClientTop = 735
- ClientWidth = 3750
- Height = 5190
- Left = 1350
- LinkTopic = "Form1"
- ScaleHeight = 4785
- ScaleWidth = 3750
- Top = 390
- Width = 3870
- Begin VB.CommandButton About
- Caption = "About"
- Height = 495
- Left = 240
- TabIndex = 7
- Top = 3960
- Width = 1455
- End
- Begin VB.CommandButton Extract
- Caption = "Extract"
- Height = 495
- Left = 240
- TabIndex = 6
- Top = 3360
- Width = 1455
- End
- Begin VB.CommandButton Delete
- Caption = "Delete"
- Height = 495
- Left = 2040
- TabIndex = 5
- Top = 3360
- Width = 1335
- End
- Begin VB.CommandButton Command1
- Caption = "Exit"
- Height = 495
- Left = 2040
- TabIndex = 4
- Top = 3960
- Width = 1335
- End
- Begin VB.ListBox List1
- Height = 2205
- Left = 2040
- MultiSelect = 2 'Extended
- TabIndex = 1
- Top = 240
- Width = 1335
- End
- Begin VB.FileListBox File1
- Height = 2205
- Left = 240
- Pattern = "*.zip"
- TabIndex = 0
- Top = 240
- Width = 1455
- End
- Begin Threed.SSPanel SSPanel1
- Height = 375
- Left = 480
- TabIndex = 3
- Top = 2520
- Width = 2655
- _Version = 65536
- _ExtentX = 4683
- _ExtentY = 661
- _StockProps = 15
- Caption = "SSPanel1"
- BackColor = 12632256
- FloodType = 1
- End
- Begin VB.TextBox JobProgress
- Height = 375
- Left = 480
- TabIndex = 2
- Text = "Job Progress -I'm invisible, dude"
- Top = 2880
- Visible = 0 'False
- Width = 2655
- End
- Attribute VB_Name = "Form1"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim z() As ALZipDir
- Dim LibraryHandle As Long
- Private Sub About_Click()
- frmAbout.Text1 = "EX26VB demonstrates the simplified interface. Double click on a"
- frmAbout.Text1 = frmAbout.Text1 + " zip file to display its contents. You can either"
- frmAbout.Text1 = frmAbout.Text1 + " extract or delete the file from the archive."
- frmAbout.Show 1
- End Sub
- Private Sub Command1_Click()
- Unload Form1
- End
- End Sub
- Private Sub Delete_Click()
- Dim i As Integer
- Dim j As Long
- Delete.Enabled = 0
- i = 0
- While z(i).size <> -1
- If List1.Selected(i) Then
- z(i).mark = 1
- Else
- z(i).mark = 0
- End If
- i = i + 1
- Wend
- Delete.Enabled = 1
- j = ALDelete(z(), 0, 0, JobProgress.hWnd)
- File1_Click
- End Sub
- Private Sub Extract_Click()
- Dim i As Integer
- Dim j As Long
- Extract.Enabled = 0
- i = 0
- While z(i).size <> -1
- If List1.Selected(i) Then
- z(i).mark = 1
- Else
- z(i).mark = 0
- End If
- i = i + 1
- Wend
- j = ALExtract(z(), 0, 0, 0, JobProgress.hWnd)
- Extract.Enabled = 1
- End Sub
- Private Sub File1_Click()
- Dim i As Integer
- Dim j As Long
- Dim count As Long
- Dim error As Long
- i = UBound(z, 1)
- If z(i).compressed_size <> 0 Then ALFreeDir z
- ALReadDir z(), File1.FileName, count, error
- List1.Clear
- For i = 0 To count - 1
- List1.AddItem z(i).name
- Next
- End Sub
- Private Sub Form_Load()
- File1.Path = App.Path
- ChDrive App.Path
- ChDir App.Path
- ReDim z(0)
- LibraryHandle = LoadLibrary(DLLName)
- If LibraryHandle = 0 Then
- SSPanel1.Caption = "***Error loading " + DLLName + "***"
- SSPanel1.FloodType = 0
- End If
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- FreeLibrary (LibraryHandle)
- End Sub
- Private Sub JobProgress_Change()
- SSPanel1.FloodPercent = Val(JobProgress.text)
- End Sub
-